home *** CD-ROM | disk | FTP | other *** search
/ Champak 132 (Alt) / Vol 132.iso / games / balisa.swf / scripts / DefineSprite_113 / frame_8 / DoAction.as
Encoding:
Text File  |  2011-06-09  |  1.5 KB  |  60 lines

  1. _root.showButtons(false);
  2. _root.replayos._alpha = 30;
  3. _root.gagnos.position = 0;
  4. _root.gagnos.total = 0;
  5. _root.aidetimestart = -1;
  6. initDone = false;
  7. openDone = false;
  8. parcoursArray = new Array();
  9. index = 0;
  10. demandeParcours = new LoadVars();
  11. demandeParcours.action = "allparcours";
  12. demandeParcours.sendAndLoad("pderapage.php",demandeParcours,"POST");
  13. demandeParcours.onLoad = function()
  14. {
  15.    occurence = -1;
  16.    while(occurence != -2)
  17.    {
  18.       occurence1 = this.allparcours.indexOf("_",occurence);
  19.       occurence2 = this.allparcours.indexOf("_",occurence1 + 1);
  20.       score = this.allparcours.substring(occurence,occurence1);
  21.       if(occurence2 == -1)
  22.       {
  23.          nom = this.allparcours.substring(occurence1 + 1);
  24.          occurence = -2;
  25.       }
  26.       else if(occurence2 == undefined)
  27.       {
  28.          nom = "Echec";
  29.          score = "0";
  30.          occurence = -2;
  31.       }
  32.       else
  33.       {
  34.          nom = this.allparcours.substring(occurence1 + 1,occurence2);
  35.          occurence = occurence2 + 1;
  36.       }
  37.       if(score.substring(0,1) == "#")
  38.       {
  39.          score = score.substring(1);
  40.          coeur = true;
  41.       }
  42.       else
  43.       {
  44.          coeur = false;
  45.       }
  46.       if(score.substring(0,1) == "N")
  47.       {
  48.          score = score.substring(1);
  49.          nouv = true;
  50.       }
  51.       else
  52.       {
  53.          nouv = false;
  54.       }
  55.       parcoursArray[index] = new Array(nom,score,coeur,nouv);
  56.       index += 1;
  57.    }
  58.    initDone = true;
  59. };
  60.